<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>商品管理</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	
	<link rel="stylesheet" type="text/css" href="css/showgoods.css">
	<script type="text/javascript">
	//分页
		function firstpage(){
			window.location.href="pageFirst1234.do";
		}
		
		function lastpage(){
			window.location.href="pageLast1234.do";
		}
		
		function uppage(){
			var nowPage=document.getElementById("page_value").value;
			
			window.location.href="pageUp1234.do?nowPage="+nowPage;
		}
		
		function downpage(){
			var nowPage=document.getElementById("page_value").value;
			
			window.location.href="pageDown1234.do?nowPage="+nowPage;
		}
	
		function yesno(){
			var c=confirm("确定删除");
			
				return c;		
		}
	</script>

  </head>
  
  <body>
  	<div class="div_all">
  		
  		
  		<div class="div_2">
	  		<div class="div_show">
	  			<!--搜索  -->
				<div class="div_sousuo">
					<form action="show_lj.do" method="post">
						<!--placeholder会在输入字段为空时显示，并会在字段获得焦点时消失。-->
						<input type="text" class="input1" name="title" placeholder="链接标题"/>
						<input type="submit" class="button1" value="搜索" />
					</form>
				</div>
			    <table class="table_class">
			    	<tr >
			    		<td width="200px" height="40px">链接标题</td>
			    		<td width="200px" height="40px">链接地址</td>
			    	</tr>
			    	<c:forEach items="${lList}" var="Lianjie">
				    	<tr>
				    		<td>${Lianjie.title}</td>
				    		<td>${Lianjie.address}</td>
				    		<td width="100px" height="40px"><a  href="getljbyid.do?id=${Lianjie.id}" class="goods_update">更改</a><td >
				    		<td width="100px" height="40px"><a onclick="return yesno()" href="delete_lj.do?id=${Lianjie.id}" class="goods_delete">删除</a><td >
				    	</tr>
			    	</c:forEach>
			    	
			    	
			    	<!--分页-->
			    	<tr>
			    		<td></td>
			    		<td><input type="button" value="首页" onclick="firstpage()"></td>
			    		<td></td>
			    		<td><input type="button" value="上一页" onclick="uppage()"></td>
			    		<td><input type="button" value="下一页" onclick="downpage()"></td>
			    		<td></td>
			    		<td><input type="button" value="尾页" onclick="lastpage()"></td>
			    		
			    	</tr>
			   
			    </table>
			    <input type="hidden" id="page_value" value="${page.nowpage}"/>
		    </div>
	    </div>
    </div>
  </body>
</html>
